<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class PatientInfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('patient',function(Blueprint $table){
            $table->bigIncrements('id')->unsigned;
            $table->string('first_name')->index()->nullable()->unsigned;
            $table->string('last_name')->index()->nullable()->unsigned;
            $table->string('address')->nullable();
            $table->enum('sex',array('male'=>'male', 'female'=>'female'))->nullable();
            $table->integer('check_num')->nullable()->unsigned;
            $table->integer('age')->nullable()->unsigned;
            $table->date('reg_time')->nullable();
            $table->date('last_check_time')->nullable();
            $table->decimal('eyesight_left')->nullable();
            $table->decimal('eyesight_right')->nullable();
			$table->string('portait_url')->nullable();
            $table->string('contact_num')->nullable();
			$table->string('description')->nullable();
            $table->timestamps();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('patient');
    }
}
